# Maintainer: Mathew Meins <mm@blackhelicopters.net>
pkgname=tncattach
pkgver=0.1.9
pkgrel=1
pkgdesc="Attach amateur radio TNC devices as network interfaces"
url="https://github.com/markqvist/tncattach"
arch="all"
license="MIT"
makedepends="argp-standalone linux-headers"
subpackages="$pkgname-doc"
options="!check" # No upstream test suite
source="https://github.com/markqvist/tncattach/archive/$pkgver/tncattach-$pkgver.tar.gz"

build() {
	gcc tncattach.c Serial.c TCP.c KISS.c TAP.c -largp -o tncattach
}

package() {
	install -D -m755 "$builddir"/tncattach \
		"$pkgdir"/usr/sbin/tncattach
}

doc() {
	gzip "$builddir"/tncattach.8
	install -D -m644 "$builddir"/tncattach.8.gz \
		"$subpkgdir"/usr/share/man/man8/tncattach.8.gz
}

sha512sums="aaa8572b2ac51b1dbf32b4023acb83c6c0334627644d5f33bc684c3cc6ba1bd09065e52c34586553d82e7a0538d164d8c8c2ab48bec5e16f99c3dea5129142f8  tncattach-0.1.9.tar.gz"
